package com.allwayz.service;

import com.allwayz.entity.CommonResult;
import com.allwayz.entity.Payment;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author allwayz
 */
@Component
@FeignClient(value = "CLOUD-PAYMENT-SERVICE")
public interface PaymentFeignService {
    /**
     * 调用云支付微服务
     * @param id
     * @return
     */
    @GetMapping("/payment/{id}")
    public CommonResult<Payment> getPaymentById(@PathVariable("id") Long id);

    /**
     * 调用云支付微服务
     * @return
     */
    @GetMapping("/payment/timeout")
    public String paymentFeignTimeout();
}
